package com.atguigu.ssm.service.impl;

import com.atguigu.ssm.mapper.EmpMapper;
import com.atguigu.ssm.pojo.Emp;
import com.atguigu.ssm.service.EmpService;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author chenyifan
 * @create 2022-08-04 11:18
 */
@Service
@Transactional
public class EmpServiceImpl implements EmpService {

    @Autowired
    private EmpMapper empMapper;

    @Override
    public List<Emp> getAllEmp() {
        List<Emp> emps = empMapper.getAllEmp();
        return emps;
    }
}
